package bysj.service;

import bysj.dao.GraduateProjectTruenessDao;
import bysj.domain.GraduateProjectTrueness;
import util.JdbcHelper;

import java.sql.Connection;
import java.sql.SQLException;

public class GraduateProjectTruenessService {
    private GraduateProjectTruenessDao graduateProjectTruenessDao = GraduateProjectTruenessDao.getInstance();
    private static GraduateProjectTruenessService graduateProjectTruenessService = new GraduateProjectTruenessService();

    //Singleton
    private GraduateProjectTruenessService(){}

    public static GraduateProjectTruenessService getInstance(){
        return graduateProjectTruenessService;
    }


    public GraduateProjectTrueness find(Integer id) throws SQLException {
        Connection connection = JdbcHelper.getConn();
        GraduateProjectTrueness graduateProjectTrueness = graduateProjectTruenessDao.find(id,connection);
        JdbcHelper.close(connection);
        return graduateProjectTrueness;
    }
}
